﻿using System;
using System.Collections.Generic;
using NUnit.Framework;
using ExcelUIMap;
using System.IO;

namespace ExcelUIMap.Test
{

	/// <summary>
	/// Test cases to ensure different excel document can be loaded
	/// Positive and negative tests
	/// </summary>
	[TestFixture]
	public class ExcelLoadingFixture
	{
		
		[Test]
		public void Positive_Test_1()
		{
			var UIMap = new UIMap("Positive_Test_1","7.1.2");
			Assert.IsTrue(UIMap.Items.Count == 1);
		}
		
		[Test]
		[ExpectedException(typeof(FileNotFoundException))]
		public void File_Not_Found()
		{
			var UIMap = new UIMap("File not found","7.1.2");
			Assert.Fail();
		}
		
		[Test]
		[ExpectedException(typeof(FileLoadException))]
		public void No_Map_Sheet()
		{
			var UIMap = new UIMap("No_Map_Sheet","7.1.2");
			Assert.Fail("Should not reach here");
		}
		
		[Test]
		[ExpectedException(typeof(FileLoadException))]
		public void Version_Column_Not_Found()
		{
			var UIMap = new UIMap("Blank_Version_Columns","7.1.3");
			Assert.Pass();
		}
		
		
	}
}